package fourzerofour.yangqiang.day01;

import java.util.Scanner;

public class Question5 {
    public static void main(String[] args) {
       Scanner scanner = new Scanner (System.in);
        System.out.println("请输入您的数字：");
       int n =  scanner.nextInt();
       int i = n/100;
       int l = n%100/10;
       int j = n%10;
       int m = 0;
       if(i>=j && i>=l){
           m = i;
           System.out.println("最大值在百位，值为："+i);
       }else if(j>=i && j>=l){
           m = j;
           System.out.println("最大值在个位，值为："+j);
       }else if(l>=i && l>=j){
           m = l;
           System.out.println("最大值在十位，值为："+l);
       }
        System.out.println("您输出的数字为："+n+"  百位上是："+i+"  十位上是："+l+"  个位上是："+j+"  所以最大值是："+m);
    }
}
